[index]
Prepare Command
Syntax
prepare <movie> Applies to movies
Description
The prepare command prepares a movie for playback by opening the file on the disk or requesting a stream from the server, allocating memory, and performing some initialization.
Notes
Every movie playback must be preceded by a prepare. If you use the play command without first using the prepare command, the movie object performs an implicit prepare to do the necessary work. The following code:
on mouseUp prepare mov 1 play mov 1
end mouseUp
performs exactly the same functions as:
on mouseUp play mov 1 end mouseUp
For example, if you create an application in which a user is solving a puzzle, the application can be busy preparing the "You Win!" and "Try Again" movies in the background, perhaps taking up 20 seconds that the user doesn't notice while engrossed in solving the puzzle.
Examples
The following handler prepares a movie whenever a card is opened.
on openCard
prepare movie "Instructions"
end openCard
The following handler in a button script plays a movie when the user clicks on the button:
on mouseUp
play movie "Instructions"
This text has been mechanically extracted from the Oracle Media Objects 1.0.4.9 MediaTalk Reference, © 1995 Oracle Corporation, and is provided here solely for educational/historical purposes.